<?php
sort($tab_details);
//echo count($tab_details);
//var_dump($tab_details);
for ($x = 0; $x < count($tab_details); $x++) {

//foreach($tab_details as $num_tel => $value);  //var_dump($tab_details[$num]);
    //echo $tab_details[$x]['ndi'][0];
    echo "<h4>D&eacute;tails pour la ligne: " . $tab_details[$x]['ndi'][0] . "</h4>";
    //echo key($tab_details);
//}
    ?> 
    <table width="560">
        <tr>
            <td width="150">
                <b>Date et heure</b>
            </td>
            <td width="200">
                <b>Type</b>
            </td>
            <td width="110">
                <b>Destinataire</b>
            </td>
            <td width="100">
                <b>Durée/Quantité</b></td>
        </tr>
    <?php
    $i = 0;
    //foreach($value['date'] as $data)
    foreach ($tab_details[$x]['ndi'] as $value) { //var_dump($value);
        ?> 
            <tr>
                <td>
            <?php
            echo $tab_details[$x]['date'][$i] . "</td><td>";
            echo $tab_details[$x]['type'][$i] . "</td><td>";
            echo "0" . $tab_details[$x]['destinataire'][$i] . "</td><td>";
            echo gmdate("H:i:s", $tab_details[$x]['duree'][$i]);
            $i++;
            ?> 
                </td>
            </tr>
                    <?php
                }
                ?> 
    </table>
        <?php
    }
    ?> 
